home *** CD-ROM | disk | FTP | other *** search
- Path: engnews1.Eng.Sun.COM!taumet!clamage
- From: "brian (b.c.) white" <bcwhite@bnr.ca>
- Newsgroups: comp.std.c++
- Subject: Re: Generic Object Callbacks
- Date: 26 Feb 1996 16:07:58 GMT
- Organization: Bell-Northern Research Ltd.
- Approved: clamage@eng.sun.com (comp.std.c++)
- Message-ID: <4gsi2p$905@bcarh8ab.bnr.ca>
- References: <pgpmoose.199602221531.14635@isolde.mti.sgi.com>
- NNTP-Posting-Host: taumet.eng.sun.com
- Content-Identifier: Re: Generic O...
- X-Nntp-Posting-Host: bcarsd26.bnr.ca
- Originator: clamage@taumet
-
- In article <pgpmoose.199602221531.14635@isolde.mti.sgi.com>,
- ian (i.) willmott <willmott@bnr.ca> wrote:
-
- >In an article entitled "Q: Generic Callbacks -- Object->*func(...)"
- >(reference <4fti32$p3p@bcarh8ab.bnr.ca>), bcwhite@bnr.ca asks
-
- >"Does the C++ standard allow for a generic callback to be specified?
- >Basically, I'd like to be able to pass an arbitrary object and
- >function of that object to be called at some later time."
-
- >What is needed is the ability to use member functions as callbacks
- >without any constraint on the type of the object they are invoked on.
- >This is possible in C++ only by using various implementation-dependent
- >hacks to escape the type system, because the language does not provide
- >any way to express such a construct.
-
- Of course, what we're really trying to with all this is to pass _code_
- (along with its context) as an object.
-
- Brian
- ( bcwhite@bnr.ca )
-
- -------------------------------------------------------------------------------
- In theory, theory and practice are the same. In practice, they're not.
- [ To submit articles: Try just posting with your newsreader.
- If that fails, use mailto:std-c++@ncar.ucar.edu
- FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
- Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
- Comments? mailto:std-c++-request@ncar.ucar.edu
- ]
-